package com.ibeeking.found.cms.c.rest.controller.v1;

import com.ibeeking.found.cms.c.rest.service.IPageComponentsService;
import com.ibeeking.found.common.db.annotation.Read;
import com.ibeeking.nematos.constants.enums.OperateLogTypeEnum;
import com.ibeeking.nematos.log.annotation.Log;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @ClassName PageComponentsController
 * @Description
 * @Author ibeeking
 * @Date 2021-05-08 16:05
 **/
@RestController
@RequestMapping("/c/pageComponents/v1")
public class PageComponentsController {

    @Resource
    private IPageComponentsService pageComponentsServiceImpl;

    @Read
    @Log(logType = OperateLogTypeEnum.QUERY, describe = "查看所有页面组件")
    @PostMapping(value = "/queryAllComponents")
    public List queryAllComponents() {
        return pageComponentsServiceImpl.queryAll();
    }

}
